#!/usr/bin/python
import math

infile=open("base_exp.txt", "r");


largest=0;
bestline=0;

linenum=0;

for line in infile:
	linenum+=1;
	parts=line.rstrip().split(",");
	val= math.log(int(parts[0]))*int(parts[1]);

	if( val>largest):
		largest=val;
		bestline=linenum;

print bestline;
